package com.angular.useradmin.user.mapper;

import com.angular.useradmin.user.entity.New;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author 许根银
 * @since 2023-01-05
 */
@Mapper
public interface NewMapper extends BaseMapper<New> {
    /**
     * copy表数据
     * @return
     */
    boolean copyTable();
    /**
     * 删除某表数据
     * @return
     */
    int deleteTable();
    /**
     * 获取某数据库内所有表名
     * @return
     */
    String[] getAllTableName();
    /**
     * 获取到表下所有字段名
     * @return
     */
    String[] getAllFieldName(@Param("tableName")String tableName);
    /**
     * 获取字段下所有值
     * @return
     */
    String[] getAllValue(@Param("tableName")String tableName,@Param("fieldName")String fieldName);
    List<Map<String, Object>> getAll(@Param("tableName")String tableName);
    /**
     * 获取两张表join值
     * @return
     */
    List<Map<String, Object>> getQueryAllData();
    /**
     * translate转移数据
     */
    int  translate(@Param("map") Map<String, Object> map,@Param("tableName")String tableName);
}

